package com.yunfeng.supercall.bean;

import java.io.Serializable;

import android.os.Parcel;

public class RecentCallsBean extends SuperFriendsBean {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public static final int TYPE_MISSED_CALL = 1;
	public static final int TYPE_OUT_CALL = 2;
	public static final int TYPE_IN_CALL = 3;
	public static final int TYPE_MISSED_CALL_OTHER = 4;
	boolean typeIsDataInPhone = false;
	public RecentCallsBean() {
		super();
	}
	private String callid;
	private int user1;
	private int user2;
	private String calltime;
	private int state;
	private int callnum;
//	@Override
//	public int compareTo(ContactsBase another) {
//		// TODO Auto-generated method stub
//		RecentCalls calls = (RecentCalls) another;
//		return (int) (calls.callTime - callTime);
//	}

	public int getUser2() {
		return user2;
	}


	public int getCallnum() {
		return callnum;
	}


	public void setCallnum(int callnum) {
		this.callnum = callnum;
	}


	public void setUser2(int user2) {
		this.user2 = user2;
	}


	public String getCallid() {
		return callid;
	}


	public void setCallid(String callid) {
		this.callid = callid;
	}


	public int getUser1() {
		return user1;
	}


	public void setUser1(int user1) {
		this.user1 = user1;
	}


	public String getCalltime() {
		return calltime;
	}


	public void setCalltime(String calltime) {
		this.calltime = calltime;
	}


	public int getState() {
		return state;
	}


	public void setState(int state) {
		this.state = state;
	}


	public boolean isTypeIsDataInPhone() {
		return typeIsDataInPhone;
	}


	public void setTypeIsDataInPhone(boolean typeIsDataInPhone) {
		this.typeIsDataInPhone = typeIsDataInPhone;
	}


	public RecentCallsBean(Parcel parcel) {
		super(parcel);
//		callType = parcel.readInt();
//		callTime = parcel.readLong();
//		callId = parcel.readInt();
//		callLenth = parcel.readLong();
//		name = parcel.readString();
//		photo = parcel.readString();
//		vo_id = parcel.readString();
//		phone = parcel.readString();
//		userid = parcel.readInt();
//		sucolor = parcel.readInt();
	}


//	public RecentCalls(SuperFriends friends) {
//		setPhone(friends.getSuid());
//		setUserid(friends.getUserid());
//		setVo_id(friends.getVo_id());
//		setPhoto(friends.getPhoto());
//		setUserid(friends.getUserid());
//		setType(friends.getType());
//		setSucolor(friends.getSucolor());
//		// setAddress(friends.getAddress());
//		// setPhone(friends.getPhone());
//		// setNick_name(friends.getNick_name());
//		// setReal_name(friends.getReal_name());
//		// setUserid(friends.getUserid());
//		// setVo_id(friends.getVo_id());
//		// setContactsFromPhone(friends.isContactsFromPhone());
//		// setPhoto(friends.getPhoto());
//	}

//	private CharSequence superNumber;
//
//	public CharSequence getSuperNumber() {
//		setSuid(phone);
//		return super.getSuperNumber();
//		// if (superNumber == null) {
//		// String number = phone;
//		// if (getType() == TYPE_PERSONAL) {
//		// number += replaceTextColor("8", "8", RED).toString();
//		// } else {
//		// number = replaceTextColor("0", "0", RED) + number;
//		// }
//		// superNumber = number;
//		// }
//		// return Html.fromHtml(superNumber.toString());
//	}

	public static final Creator<RecentCallsBean> CREATOR = new Creator<RecentCallsBean>() {

		@Override
		public RecentCallsBean[] newArray(int size) {
			// TODO Auto-generated method stub
			return new RecentCallsBean[size];
		}

		@Override
		public RecentCallsBean createFromParcel(Parcel source) {
			// TODO Auto-generated method stub
			return new RecentCallsBean(source);
		}
	};

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		// TODO Auto-generated method stub
		super.writeToParcel(dest, flags);
	}


	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		RecentCallsBean mBean = (RecentCallsBean) o;
		return mBean.getNick_name().equals(getNick_name());
	}




	

}
